<template>
  <view class="weui-search-bar__box" @click="onTap">
    <icon class="weui-icon-search_in-box" type="search" color="#ff8d44" size="15"></icon>
    <view class="weui-search-bar__input" >
      <text>{{placeholder}}</text>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    placeholder: {
      type: String,
      value: "请输入关键字",
    },
  },
  methods: {
    onTap() {
      this.$emit("cc", { id: 20, name: "ni" });
    },
  },
};
</script>


<style lang="less">
.weui-icon-search_in-box {
  position: absolute;
  left: 8px;
  top: 7px;
}
.weui-search-bar__box {
  position: relative;
  padding-left: 30px;
  padding-right: 30px;
  width: 100%;
  box-sizing: border-box;
  z-index: 1;
  margin-bottom: 8px;
}
.weui-search-bar__input {
  height: 28px;
  line-height: 28px;
  font-size: 14px;
  color: #999;
}
</style>